package com.msb.baseFunctionalInterface;

public class RunnableTest {
    public static void main(String[] args) {
        new Thread(()->{
            fun();
        }).start();

        new Thread(RunnableTest::fun).start();
    }

    public static void fun(){
        System.out.println("开始: " + Thread.currentThread());
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("结束: " + Thread.currentThread());
    }


}
